package com.tj.collection.bean;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2019/8/29
 * Time: 下午3:46
 */
public class AgentVo {

    //催收人员姓名
    private String name;

    //催收人员唯一标识
    private String agentId;

    //是否分单结束
    private boolean isFull = false;

    //当前分配的订单数
    private Integer orderNum = 0;

    //支持的语言数
    private Integer languageNum = 0;

    //订单数上线
    private Integer maxNum = 0;

    //支持的语言列表
    private List<String> languageList = new ArrayList<>();

    //每种语言分配的数量
    private Map<String, Integer> languageSupportNumMap = new HashMap<>();

    //每种语言实际被分配的数量
    private Map<String, Integer> languageAllocatedNumMap = new HashMap<>();


    public AgentVo(String name, String agentId, List<String> languageList, Integer maxNum) {
        this.languageList = languageList;
        languageList.forEach(l -> {
            languageSupportNumMap.put(l, 0);
        });

        languageNum = languageList.size();
        this.name = name;
        this.agentId = agentId;
        if (maxNum == null) {
            maxNum = 150;
        }
        
        this.maxNum = maxNum;
    }

    public Integer getMaxNum() {
        return maxNum;
    }

    public  AgentVo setMaxNum(Integer maxNum) {
        this.maxNum = maxNum;
        return this;
    }

    public Map<String, Integer> getLanguageAllocatedNumMap() {
        return languageAllocatedNumMap;
    }

    public  AgentVo setLanguageAllocatedNumMap(Map<String, Integer> languageAllocatedNumMap) {
        this.languageAllocatedNumMap = languageAllocatedNumMap;
        return this;
    }

    public String getName() {
        return name;
    }

    public  AgentVo setName(String name) {
        this.name = name;
        return this;
    }

    public String getAgentId() {
        return agentId;
    }

    public  AgentVo setAgentId(String agentId) {
        this.agentId = agentId;
        return this;
    }

    public boolean isFull() {
        return isFull;
    }

    public  AgentVo setFull(boolean full) {
        isFull = full;
        return this;
    }

    public List<String> getLanguageList() {
        return languageList;
    }

    public  AgentVo setLanguageList(List<String> languageList) {
        this.languageList = languageList;
        return this;
    }

    public  AgentVo setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
        return this;
    }

    public  AgentVo setLanguageNum(Integer languageNum) {
        this.languageNum = languageNum;
        return this;
    }

    public  AgentVo setLanguageSupportNumMap(Map<String, Integer> languageSupportNumMap) {
        this.languageSupportNumMap = languageSupportNumMap;
        return this;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public Integer getLanguageNum() {
        return languageNum;
    }


    public Map<String, Integer> getLanguageSupportNumMap() {
        return languageSupportNumMap;
    }

}
